package javaCode.chapter07.Homework.homework05;

//2、教师除基本工资外，还有课酬(元/天) classDay，classSal
public class Teacher extends Employee{
    private int classDay; //一年上课的次数
    private double classSal; //课时费

    public Teacher(String name, double sal) {
        super(name, sal);
    }

    //因为和父类不同，需要重新写
    @Override
    public void yearSal() {
        System.out.println("老师" + super.getName() + " 年薪=" + (super.getSalMonth() * super.getSal() + (classDay * classSal)));
    }

    public int getClassDay() {
        return classDay;
    }

    public void setClassDay(int classDay) {
        this.classDay = classDay;
    }

    public double getClassSal() {
        return classSal;
    }

    public void setClassSal(double classSal) {
        this.classSal = classSal;
    }
}
